#include<bits/stdc++.h>

using namespace std;
typedef long long ll;

char a[33];
char op[2];
char b[33];
char c[33];

int bin2dec(char a[]) {
    int n;
    //scanf("%d",&n);
    n = 0;
    for (int i = 0; i < strlen(a); i++) {
        n = n * 2 + a[i] - '0';
    }

    return n;
}

void dec2bin(int n, char a[]) {
    int j = 0;
    do {
        int d = n & 1;
        a[j++] = d + '0';
        n >>= 1;
    } while (n > 0);
    reverse(a, a + j);
}

int main() {
    cin >> a >> op >> b;
    int x, y, z;
    x = bin2dec(a);
    y = bin2dec(b);


    if (strcmp(op, "+") == 0) {
        z = x + y;

    } else {
        z = x - y;
    }
    dec2bin(z, c);
    cout << c;
    return 0;
}
//1100 + 1011
//1100 - 101